<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'导入'))}
	<form class="well" method='post' id="form_data" enctype="multipart/form-data">
		<input type="hidden" name="opmode" value="import">
		<input type="hidden" name="row_type" value="{$row_type}">
		<input type="hidden" name="controller" value="{$controller}">
		<div class="layui-form-item">
			选择要导入的文件&nbsp;
			<input type="file" name="uploadfile" value="" >
		</div>
		<div class="layui-form-item">
			<a class="btn" id="btn_save">导入</a>
			<a class="btn btn-cancel" onclick="go_return_url();">取消</a>
		</div>
	</form>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;

			$("#btn_save").on('click', function() {
				send_form("form_data", "{:U('import')}", "", function(ret) {
					if (ret.status) {
						layer.msg(ret.info, function() {
							go_return_url();
						});
					} else {
						layer.msg(ret.info);
						return false;
					}
				});
			});
		});
	</script>
</block>